<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Day</title>
    <link rel="stylesheet" href="element-ui/lib/theme-chalk/index.css">
    <script src="js/vue.js"></script>
    <script src="element-ui/lib/index.js"></script>
    <script src="js/axios-0.18.0.js"></script>
</head>
<body>
<div id="div">
    <b style="color: red; font-size: 20px;">day</b>
    <template>
        <div class="block">
            <span class="demonstration">默认</span>
            <el-date-picker
                    v-model="value1"
                    type="daterange"
                    range-separator="至"
                    start-placeholder="开始日期"
                    end-placeholder="结束日期">
            </el-date-picker>
        </div>
    </template>
    <el-button type="primary" @click="searchData()">查询</el-button>
    <el-table :data="tableData">
        <el-table-column prop="date" label="日期" width="120">
        </el-table-column>
        <el-table-column prop="sum" label="注册人数" width="120">
        </el-table-column>
        <el-table-column prop="day01" label="day01" width="140">
        </el-table-column>
        <el-table-column prop="day02" label="day02">
        </el-table-column>
        <el-table-column prop="day03" label="day03">
        </el-table-column>
        <el-table-column prop="day04" label="day04">
        </el-table-column>
        <el-table-column prop="day05" label="day05">
        </el-table-column>
        <el-table-column prop="day06" label="day06">
        </el-table-column>
        <el-table-column prop="day07" label="day07">
        </el-table-column>
        <el-table-column prop="day30" label="day30">
        </el-table-column>
    </el-table>

</div>
</body>
<script>
    new Vue({
        el: "#div",
        data: {
            tableData: [],//表格数据
            value1: '',
        },
        methods: {
            parseElement(start, end) {
                return "start=" + start + "&end=" + end;
            },
            selectByPage(start,end) {
                axios.get("daySum/ret?" + this.parseElement(start, end))
                    // axios.post("studentServlet","method=selectByPage&currentPage="+
                    //     +this.pagination.currentPage+"&pageSize="+this.pagination.pageSize)
                    .then(resp => {
                        this.tableData = resp.data;

                    })
            },
            searchData() {

               this.selectByPage(this.value1[0],this.value1[1])
            }
        },

    });
</script>
</html>